/*
 * 人人信用管理有限公司版权所有.
 * 
 * @Description:
 * 
 * @author: liyuliang
 * 
 * @date: 20 Apr 2017 10:44:16 am
 * 
 * 注意：本内容仅限于人人信用管理有限公司内部传阅，禁止外泄以及用于其他的商业目的.
 */

package com.rrx360.common.config.global;

import java.util.Arrays;

import com.rrx360.common.config.ConfigNode;
import com.rrx360.common.config.ConfigNodeGetter;
import com.rrx360.common.config.ConfigNodeImpl;

public class DefaultCommonConfigNodeGetter implements ConfigNodeGetter {

  public static final DefaultCommonConfigNodeGetter instance = new DefaultCommonConfigNodeGetter();

  private ConfigNodeImpl configNode;

  public static final String CONFIG_FILE_PATH = "config/config.properties";
  public static final String PROFILE_FILE_PATH = "config/profile.properties";
  public static final String NODE_ID = "global.common";

  public ConfigNode get() {
    if (configNode == null) {
      configNode = new ConfigNodeImpl();
      configNode.setNodeId(NODE_ID);
      configNode.setConfigFileList(Arrays.asList(PROFILE_FILE_PATH, CONFIG_FILE_PATH));
    }
    return configNode;
  }



}
